package demo1.servlet;

import com.lagou.pojo.Request;
import com.lagou.pojo.Response;
import com.lagou.servlet.HttpServlet;
import com.lagou.util.HttpProtocolUtil;

public class LagouServlet extends HttpServlet {

    @Override
    public void doGet(Request request, Response response) throws Exception {
        String text = "demo1_LagouService-doGet";
        response.output(HttpProtocolUtil.httpResponseHeader200(text.getBytes().length) + text);
    }

    @Override
    public void doPost(Request request, Response response) throws Exception {
        String text = "demo1_LagouService-doPost";
        response.output(HttpProtocolUtil.httpResponseHeader200(text.getBytes().length) + text);

    }
}
